<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
<!DOCTYPE HTML>
<html>
<head>
<title>403 Forbidden</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="${pageContext.request.contextPath}/assets/css/style403.css">
</head>
<body>
<div class="wrap">
	<h1>HTTP Status 403 Forbidden - Access is Denied</h1>
	<div class="banner">
		<img src="${pageContext.request.contextPath}/assets/images/banner.png" alt="403" />
	</div>
	<div class="page">		
		<c:choose>
			<c:when test="${empty username}">
				<h2>You don't have permission to access this page!</h2>
			</c:when>
			<c:otherwise>
				<c:url var="logoutUrl" value="/j_spring_security_logout" />
				<h2>UserName : ${username} <br/>You do not have permission to access this page!</h2>
				<security:authorize access="isAuthenticated()">
					<span class="login">Hi, <security:authentication property="principal.username" />|
					<a href="${logoutUrl}">Log out</a></span>
				</security:authorize>
			</c:otherwise>
	</c:choose>
	</div>
	<div class="footer">
		<p>Back to previous <a href="javascript:history.back()">page</a></p>
	</div>
</div>
</body>
</html>
